package com.hlf.modules.sys.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.hlf.modules.base.entity.BaseModel;

/**
 * 文件实体类
 * 
 * 
 * @author shuliangxing
 *
 */
public class File extends BaseModel {
    /**
     *
     */
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long filId;

    /**
     * 文件原始名称
     */
    private String filOriName;

    /**
     * 原始文件后缀
     */
    private String filOriSuffix;

    /**
     * 原始文件大小,单位b
     */
    private Integer filOriSizeB;

    /**
     * 服务器文件名称
     */
    private String filSerName;

    /**
     * 服务器文件大小,单位b
     */
    private Integer filSerSizeB;

    /**
     * 服务器存储路径
     */
    private String filSerPath;

    /**
     * 文件类型,如:AD_IMG:广告图片;多张或有可能多张图片的情况采用此方式,像一般一对一的图片(如:头像)采用主外键关联的方式
     */
    private String filType;

    /**
     * 文件类型名称,如:广告图片
     */
    private String filTypeName;

    /**
     * 对应外键表的id
     */
    private Long foreignId;

    /**
     * 数据是否正常(可逆状态), 1:正常, 0:停用,来自t_dictionary.NORMAL
     */
    private Integer normal;

    public Long getFilId() {
        return filId;
    }

    public void setFilId(Long filId) {
        this.filId = filId;
    }

    public String getFilOriName() {
        return filOriName;
    }

    public void setFilOriName(String filOriName) {
        this.filOriName = filOriName == null ? null : filOriName.trim();
    }

    public String getFilOriSuffix() {
        return filOriSuffix;
    }

    public void setFilOriSuffix(String filOriSuffix) {
        this.filOriSuffix = filOriSuffix == null ? null : filOriSuffix.trim();
    }

    public Integer getFilOriSizeB() {
        return filOriSizeB;
    }

    public void setFilOriSizeB(Integer filOriSizeB) {
        this.filOriSizeB = filOriSizeB;
    }

    public String getFilSerName() {
        return filSerName;
    }

    public void setFilSerName(String filSerName) {
        this.filSerName = filSerName == null ? null : filSerName.trim();
    }

    public Integer getFilSerSizeB() {
        return filSerSizeB;
    }

    public void setFilSerSizeB(Integer filSerSizeB) {
        this.filSerSizeB = filSerSizeB;
    }

    public String getFilSerPath() {
        return filSerPath;
    }

    public void setFilSerPath(String filSerPath) {
        this.filSerPath = filSerPath == null ? null : filSerPath.trim();
    }

    public String getFilType() {
        return filType;
    }

    public void setFilType(String filType) {
        this.filType = filType == null ? null : filType.trim();
    }

    public String getFilTypeName() {
        return filTypeName;
    }

    public void setFilTypeName(String filTypeName) {
        this.filTypeName = filTypeName == null ? null : filTypeName.trim();
    }

    public Long getForeignId() {
        return foreignId;
    }

    public void setForeignId(Long foreignId) {
        this.foreignId = foreignId;
    }

    public Integer getNormal() {
        return normal;
    }

    public void setNormal(Integer normal) {
        this.normal = normal;
    }


    @Override
    public String toString() {
        return "File{" +
                "filId=" + filId +
                ", filOriName='" + filOriName + '\'' +
                ", filOriSuffix='" + filOriSuffix + '\'' +
                ", filOriSizeB=" + filOriSizeB +
                ", filSerName='" + filSerName + '\'' +
                ", filSerSizeB=" + filSerSizeB +
                ", filSerPath='" + filSerPath + '\'' +
                ", filType='" + filType + '\'' +
                ", filTypeName='" + filTypeName + '\'' +
                ", foreignId=" + foreignId +
                ", normal=" + normal +
                '}';
    }
}